#ifndef LIBTORRENT_PEER_CONNECTION_COMMON_H
#define LIBTORRENT_PEER_CONNECTION_COMMON_H

namespace torrent {

typedef enum {
	IDLE = 1,
	READ_LENGTH,
	READ_TYPE,
	READ_MSG,
	READ_BITFIELD,
	READ_PIECE,
	READ_SKIP_PIECE,
	WRITE_MSG,
	WRITE_BITFIELD,
	WRITE_PIECE,
	SHUTDOWN
} State;

typedef enum {
	CHOKE = 0,
	UNCHOKE,
	INTERESTED,
	NOT_INTERESTED,
	HAVE,
	BITFIELD,
	REQUEST,
	PIECE,
	CANCEL,
	NONE,					// These are not part of the protocol
	KEEP_ALIVE
} Protocol;


}  // namespace torrent


#endif // LIBTORRENT_PEER_CONNECTION_COMMON_H
